package com.kin207.netty.udp;

import java.net.InetSocketAddress;
import java.net.SocketAddress;

import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.ChannelProgressivePromise;
import io.netty.channel.ChannelPromise;
import io.netty.channel.socket.DatagramPacket;
import io.netty.util.Attribute;
import io.netty.util.AttributeKey;
import io.netty.util.CharsetUtil;
import io.netty.util.concurrent.EventExecutor;

public class UdpChannelHandlerContext implements ChannelHandlerContext {
	public ChannelHandlerContext channelHandlerContext;
	private UdpChannel channel;

	public UdpChannelHandlerContext(ChannelHandlerContext channelHandlerContext, SocketAddress socketAddress) {
		super();
		this.channelHandlerContext = channelHandlerContext;
		channel = new UdpChannel(channelHandlerContext, socketAddress);
	}

	public ChannelFuture bind(SocketAddress localAddress) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture connect(SocketAddress remoteAddress) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture disconnect() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture close() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture deregister() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture bind(SocketAddress localAddress, ChannelPromise promise) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture connect(SocketAddress remoteAddress, ChannelPromise promise) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture disconnect(ChannelPromise promise) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture close(ChannelPromise promise) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture deregister(ChannelPromise promise) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture write(Object msg) {
		return channel.write(msg);
	}

	public ChannelFuture write(Object msg, ChannelPromise promise) {
		return channel.write(msg, promise);
	}

	public ChannelFuture writeAndFlush(Object msg, ChannelPromise promise) {
		return channel.writeAndFlush(msg, promise);
	}

	public ChannelFuture writeAndFlush(Object msg) {
		return channel.writeAndFlush(msg);
	}

	public ChannelPromise newPromise() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelProgressivePromise newProgressivePromise() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture newSucceededFuture() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelFuture newFailedFuture(Throwable cause) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelPromise voidPromise() {
		// TODO Auto-generated method stub
		return null;
	}

	public Channel channel() {
		return channel;
	}

	public EventExecutor executor() {
		// TODO Auto-generated method stub
		return null;
	}

	public String name() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelHandler handler() {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean isRemoved() {
		// TODO Auto-generated method stub
		return false;
	}

	public ChannelHandlerContext fireChannelRegistered() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelHandlerContext fireChannelUnregistered() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelHandlerContext fireChannelActive() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelHandlerContext fireChannelInactive() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelHandlerContext fireExceptionCaught(Throwable cause) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelHandlerContext fireUserEventTriggered(Object evt) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelHandlerContext fireChannelRead(Object msg) {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelHandlerContext fireChannelReadComplete() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelHandlerContext fireChannelWritabilityChanged() {
		// TODO Auto-generated method stub
		return null;
	}

	public ChannelHandlerContext read() {
		return this;
	}

	public ChannelHandlerContext flush() {
		return this;
	}

	public ChannelPipeline pipeline() {
		return channel.pipeline();
	}

	public ByteBufAllocator alloc() {
		return channel.alloc();
	}

	public <T> Attribute<T> attr(AttributeKey<T> key) {
		return channel.attr(key);
	}

	public <T> boolean hasAttr(AttributeKey<T> key) {
		return channel.hasAttr(key);
	}

	public ChannelHandlerContext getChannelHandlerContext() {
		return channelHandlerContext;
	}

	public void setChannelHandlerContext(ChannelHandlerContext channelHandlerContext) {
		this.channelHandlerContext = channelHandlerContext;
	}

	public SocketAddress getSocketAddress() {
		return channel.getSocketAddress();
	}

	public void setSocketAddress(SocketAddress socketAddress) {
		this.channel.setSocketAddress(socketAddress);
	}

	public UdpChannel getChannel() {
		return channel;
	}

	public void setChannel(UdpChannel channel) {
		this.channel = channel;
	}
	
	
}
